#include "dialog.h"
#include "./ui_dialog.h"

#include <QFileDialog>
#include <QStringList>
#include <QFile>
#include <QFileInfo>
#include <QTemporaryDir>
#include <QTemporaryFile>
#include <QFileSystemWatcher>

Dialog::Dialog(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::Dialog)
{
    ui->setupUi(this);

    fileWatcher = new QFileSystemWatcher(this);
}

Dialog::~Dialog()
{
    delete ui;
}

void Dialog::on_btnOpenFile_clicked()
{
    QString curDir = QCoreApplication::applicationDirPath();
    QString filePath = QFileDialog::getOpenFileName(this, "打开一个文件", curDir, "所有文件(*.*)");
    ui->editFile->setText(filePath);
}

void Dialog::on_btnOpenDir_clicked()
{
    QString curDir = QCoreApplication::applicationDirPath();
    QString dirPath = QFileDialog::getExistingDirectory(this, "选择一个目录", curDir);
    ui->editDir->setText(dirPath);
}


void Dialog::on_btnClear_clicked()
{
    ui->plainTextEdit->clear();
}


void Dialog::on_pushButton_clicked()
{
    showButtonInfo(sender());
    QString str = QCoreApplication::applicationDirPath();
    ui->plainTextEdit->appendPlainText(str);
}

void Dialog::showButtonInfo(QObject *obj)
{
    if (!obj) return;
    auto *button = static_cast<QPushButton *>(obj);
    ui->plainTextEdit->appendPlainText(button->text());
    ui->plainTextEdit->appendPlainText(button->toolTip() + ":\n");
}

void Dialog::on_pushButton_2_clicked()
{
    showButtonInfo(sender());
    QString str = QCoreApplication::applicationFilePath();
    ui->plainTextEdit->appendPlainText(str);
}

void Dialog::on_pushButton_3_clicked()
{
    showButtonInfo(sender());
    QString str = QCoreApplication::applicationName();
    ui->plainTextEdit->appendPlainText(str);
}

void Dialog::on_pushButton_4_clicked()
{
    showButtonInfo(sender());
    QCoreApplication::setApplicationName("MyApp");
    QString str = QCoreApplication::applicationName();
    ui->plainTextEdit->appendPlainText(str);
}

void Dialog::on_pushButton_5_clicked()
{
    showButtonInfo(sender());
    QStringList strList = QCoreApplication::libraryPaths();
    for (auto &item : strList) {
        ui->plainTextEdit->appendPlainText(item);
    }
    ui->plainTextEdit->appendPlainText("");
}

void Dialog::on_pushButton_6_clicked()
{
    showButtonInfo(sender());
    QCoreApplication::setOrganizationName("AXB");
    QString str = QCoreApplication::organizationName();
    ui->plainTextEdit->appendPlainText(str);
}

void Dialog::on_pushButton_7_clicked()
{
    QCoreApplication::exit();
}

void Dialog::on_pushButton_8_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    if (!fileInfo.isFile()) return;

    QString newFile = fileInfo.path() + "/" + fileInfo.baseName() + "--副本." + fileInfo.suffix();
    QFile::copy(source, newFile);
    ui->plainTextEdit->appendPlainText("源文件:" + source);
    ui->plainTextEdit->appendPlainText("副本:" + newFile + "\n");
}

void Dialog::on_pushButton_13_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    if (!fileInfo.isFile()) return;

    QString newFile(fileInfo.path() + "/" + fileInfo.baseName() + "--副本." + fileInfo.suffix());
    QFile sourceFile(source);
    sourceFile.copy(newFile);

    ui->plainTextEdit->appendPlainText("源文件:" + source);
    ui->plainTextEdit->appendPlainText("副本:" + newFile + "\n");
}


void Dialog::on_pushButton_9_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();

    ui->plainTextEdit->appendPlainText(source);
    bool exist = QFile::exists(source);
    if (exist) {
        ui->plainTextEdit->appendPlainText("存在\n");
    }
    else {
        ui->plainTextEdit->appendPlainText("不存在");
    }
}

void Dialog::on_pushButton_14_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();

    ui->plainTextEdit->appendPlainText(source);
    QFile file(source);
    bool exist = file.exists();
    if (exist) {
        ui->plainTextEdit->appendPlainText("存在\n");
    }
    else {
        ui->plainTextEdit->appendPlainText("不存在");
    }
}

void Dialog::on_pushButton_11_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();

    if (QFile::exists(source)) {
        QFile::remove(source);
        ui->plainTextEdit->appendPlainText("删除文件:" + source + "\n");
    }
    else {
        ui->plainTextEdit->appendPlainText("文件不存在\n");
    }
}

void Dialog::on_pushButton_15_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFile file(source);

    if (file.exists()) {
        file.remove();
        ui->plainTextEdit->appendPlainText("删除文件:" + source + "\n");
    }
    else {
        ui->plainTextEdit->appendPlainText("文件不存在\n");
    }
}

void Dialog::on_pushButton_10_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    if (!fileInfo.exists()) return;

    QString newFile = fileInfo.path() + "/" + fileInfo.baseName()
                      + "--修改后的版本." + fileInfo.suffix();

    QFile::rename(source, newFile);
    ui->plainTextEdit->appendPlainText("源文件:" + source);
    ui->plainTextEdit->appendPlainText("副本:" + newFile);
}

void Dialog::on_pushButton_16_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    if (!fileInfo.exists()) return;

    QFile file(source);
    QString newFile = fileInfo.path() + "/"
                      + fileInfo.baseName() + "--修改后的版本." + fileInfo.suffix();

    file.rename(newFile);
    ui->plainTextEdit->appendPlainText("源文件:" + source);
    ui->plainTextEdit->appendPlainText("副本:" + newFile);
}

void Dialog::on_pushButton_12_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();

    if (QFile::exists(source)) {
        QFile::moveToTrash(source);
        ui->plainTextEdit->appendPlainText("删除文件:" + source + "\n");
    }
    else {
        ui->plainTextEdit->appendPlainText("文件不存在\n");
    }
}

void Dialog::on_pushButton_17_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFile file(source);

    if (file.exists()) {
        file.moveToTrash();
        ui->plainTextEdit->appendPlainText("删除文件:" + source + "\n");
    }
    else {
        ui->plainTextEdit->appendPlainText("文件不存在\n");
    }
}


void Dialog::on_pushButton_18_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    QString str = fileInfo.absoluteFilePath();
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_19_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    QString str = fileInfo.absolutePath();
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_20_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    QString str = fileInfo.fileName();
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_21_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    QString str = fileInfo.filePath();
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_22_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    QString str = QString::asprintf("%ld", fileInfo.size());
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_23_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    QString str = fileInfo.path();
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_28_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    QString str = fileInfo.baseName();
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_25_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    QString str = fileInfo.completeBaseName();
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_27_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    QString str = fileInfo.suffix();
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_29_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    QString str = fileInfo.completeSuffix();
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_24_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editDir->text();
    QFileInfo fileInfo(source);
    bool res = fileInfo.isDir();
    QString str = fileInfo.path() + (res ? "is a Dir" : "is not a Dir");
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_26_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    bool res = fileInfo.isFile();
    QString str = fileInfo.path() + (res ? "is a File" : "is not a File");
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_31_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    bool res = fileInfo.isExecutable();
    QString str = fileInfo.path() + (res ? "is executable" : "is not executable");
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_30_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    QDateTime dateTime = fileInfo.birthTime();
    QString str = dateTime.toString("yyyy-MM-dd hh:mm:ss");
    ui->plainTextEdit->appendPlainText("birthTime:" + str + "\n");
}


void Dialog::on_pushButton_33_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    QDateTime dateTime = fileInfo.lastModified();
    QString str = dateTime.toString("yyyy-MM-dd hh:mm:ss");
    ui->plainTextEdit->appendPlainText("lastModified Time:" + str + "\n");
}


void Dialog::on_pushButton_32_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    QDateTime dateTime = fileInfo.lastRead();
    QString str = dateTime.toString("yyyy-MM-dd hh:mm:ss");
    ui->plainTextEdit->appendPlainText("lastRead Time:" + str + "\n");
}


void Dialog::on_pushButton_35_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    bool res = QFileInfo::exists(source);
    QString str = res ? "exists" : "not exists";

    ui->plainTextEdit->appendPlainText(source + " " + str + "\n");
}


void Dialog::on_pushButton_34_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editFile->text();
    QFileInfo fileInfo(source);
    bool res = fileInfo.exists(source);
    QString str = res ? "exists" : "not exists";

    ui->plainTextEdit->appendPlainText(source + " " + str + "\n");
}

void Dialog::on_pushButton_36_clicked()
{
    showButtonInfo(sender());
    ui->plainTextEdit->appendPlainText(QDir::tempPath() + "\n");
}

void Dialog::on_pushButton_37_clicked()
{
    showButtonInfo(sender());
    ui->plainTextEdit->appendPlainText(QDir::rootPath() + "\n");
}

void Dialog::on_pushButton_38_clicked()
{
    showButtonInfo(sender());
    ui->plainTextEdit->appendPlainText(QDir::homePath() + "\n");
}

void Dialog::on_pushButton_39_clicked()
{
    showButtonInfo(sender());
    for (auto &item : QDir::drives())     {
        ui->plainTextEdit->appendPlainText(item.path());
    }
    ui->plainTextEdit->appendPlainText("");
}


void Dialog::on_pushButton_41_clicked()
{
    showButtonInfo(sender());
    ui->plainTextEdit->appendPlainText(QDir::currentPath() + "\n");
}


void Dialog::on_pushButton_40_clicked()
{
    showButtonInfo(sender());
    QDir::setCurrent(ui->editDir->text());
    ui->plainTextEdit->appendPlainText(QDir::currentPath() + "\n");
}

void Dialog::on_pushButton_42_clicked()
{
    showButtonInfo(sender());
    QString subDir = "subdir1";
    QDir dir(ui->editDir->text());

    QString str;
    bool ok = dir.mkdir(subDir);
    if (ok) {
        str = "所选目录下成功新建一个目录" + subDir + "\n";
    }
    else {
        str = "创建目录失败";
    }
    ui->plainTextEdit->appendPlainText(str);
}

void Dialog::on_pushButton_43_clicked()
{
    showButtonInfo(sender());
    QString source = ui->editDir->text();
    QDir dir(source);
    QString str;

    bool ok = dir.rmdir(source);
    if (ok) {
        str = "成功删除所选目录" + source + "\n";
    }
    else {
        str = "删除失败";
    }
    ui->plainTextEdit->appendPlainText(str);
}


void Dialog::on_pushButton_44_clicked()
{
    showButtonInfo(sender());
    QDir dir(ui->editDir->text());
    QString source(ui->editFile->text());

    QString str;
    bool ok = dir.remove(source);
    if (ok) {
        str = "删除文件:" + source + "\n";
    }
    else {
        str = "删除文件失败";
    }
    ui->plainTextEdit->appendPlainText(str);
}


void Dialog::on_pushButton_45_clicked()
{
    showButtonInfo(sender());
    QDir dir(ui->editDir->text());
    QString source(ui->editFile->text());
    QFileInfo fileInfo(source);
    if (!fileInfo.exists()) {
        ui->plainTextEdit->appendPlainText("源文件:" + fileInfo.absolutePath() + "不存在\n");
        return;
    }

    QString newFile = fileInfo.path() + "/" + fileInfo.baseName() + ".XYZ";
    if (dir.rename(source, newFile)) {
        ui->plainTextEdit->appendPlainText("源文件:" + source);
        ui->plainTextEdit->appendPlainText("重命名为:" + newFile + "\n");
    }
    else {
        ui->plainTextEdit->appendPlainText("重命名文件失败");
    }

}


void Dialog::on_pushButton_46_clicked()
{
    showButtonInfo(sender());
    QString curDir = QDir::currentPath(); // target所在目录
    QDir lastDir(curDir);

    ui->plainTextEdit->appendPlainText("选择目录之前:" + lastDir.absolutePath());
    QString newDir = QFileDialog::getExistingDirectory(this, "选择一个目录", curDir);
    if (newDir.isEmpty()) {
        ui->plainTextEdit->appendPlainText("未选择目录\n");
        return;
    }

    ui->editDir->setText(newDir);
    lastDir.setPath(newDir); // 设置新路径
    ui->plainTextEdit->appendPlainText("选择目录之后:" + lastDir.absolutePath() + "\n");
}

void Dialog::on_pushButton_47_clicked()
{
    showButtonInfo(sender());
    QDir dir(ui->editDir->text());

    QString str;
    bool ok = dir.removeRecursively();
    if (ok) {
        str = "递归删除目录:" + dir.absolutePath() + "\n";
    }
    else {
        str = "递归删除目录失败\n";
    }
    ui->plainTextEdit->appendPlainText(str);
}

void Dialog::on_pushButton_48_clicked()
{
    showButtonInfo(sender());
    QDir dir(ui->editDir->text()); // 操作的目录
    QString str = dir.absoluteFilePath(ui->editFile->text());
    ui->plainTextEdit->appendPlainText(str + "\n");
}

void Dialog::on_pushButton_49_clicked()
{
    showButtonInfo(sender());
    QDir dir(ui->editDir->text()); // 绝对路径
    QString str = dir.absolutePath();
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_50_clicked()
{
    showButtonInfo(sender());
    QDir dir(ui->editDir->text()); // 绝对路径
    QString str = dir.canonicalPath();
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_51_clicked()
{
    showButtonInfo(sender());
    QDir dir(ui->editDir->text()); // 绝对路径
    QString str = dir.filePath(ui->editFile->text());
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_52_clicked()
{
    // path()
    showButtonInfo(sender());
    QDir dir(ui->editDir->text()); // 绝对路径
    QString str = dir.path();
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_53_clicked()
{
    // dirName()
    showButtonInfo(sender());
    QDir dir(ui->editDir->text()); // 绝对路径
    QString str = dir.dirName();
    ui->plainTextEdit->appendPlainText(str + "\n");
}


void Dialog::on_pushButton_55_clicked()
{
    // exists()
    showButtonInfo(sender());
    QDir dir(ui->editDir->text()); // 绝对路径
    bool res = dir.exists();
    if (res) {
        ui->plainTextEdit->appendPlainText("目录:" + dir.path() + "存在\n");
    }
    else {
        ui->plainTextEdit->appendPlainText("目录:" + dir.path() + "不存在\n");
    }
}


void Dialog::on_pushButton_57_clicked()
{
    // isEmpty()
    showButtonInfo(sender());
    QDir dir(ui->editDir->text()); // 绝对路径
    bool res = dir.isEmpty();
    if (res) {
        ui->plainTextEdit->appendPlainText("目录:" + dir.path() + "为空\n");
    }
    else {
        ui->plainTextEdit->appendPlainText("目录:" + dir.path() + "不为空\n");
    }
}


void Dialog::on_pushButton_54_clicked()
{
    // entryList(dir)
    showButtonInfo(sender());
    QDir dir(ui->editDir->text()); // 绝对路径
    QStringList strList = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot);

    if (strList.isEmpty()) {
        ui->plainTextEdit->appendPlainText("所选目录为空\n");
        return;
    }

    ui->plainTextEdit->appendPlainText("所选目录下所有目录:\n");
    for (auto &item : strList) {
        ui->plainTextEdit->appendPlainText(item);
    }
    ui->plainTextEdit->appendPlainText("");
}


void Dialog::on_pushButton_56_clicked()
{
    // entryList(file)
    showButtonInfo(sender());
    QDir dir(ui->editDir->text()); // 绝对路径
    QStringList strList = dir.entryList(QDir::Files);

    if (strList.isEmpty()) {
        ui->plainTextEdit->appendPlainText("所选目录为空\n");
        return;
    }

    ui->plainTextEdit->appendPlainText("所选目录下所有文件:\n");
    for (auto &item : strList) {
        ui->plainTextEdit->appendPlainText(item);
    }
    ui->plainTextEdit->appendPlainText("");
}


void Dialog::on_pushButton_58_clicked()
{
    // 1.在系统临时目录下创建临时文件夹
    showButtonInfo(sender());
    ui->plainTextEdit->appendPlainText("QDir::tempPath()=" + QDir::tempPath());

    QTemporaryDir dir;
    dir.setAutoRemove(true);
    ui->plainTextEdit->appendPlainText(dir.path() + "\n");
}

void Dialog::on_pushButton_59_clicked()
{
    // 2.在指定目录下创建临时文件夹
    showButtonInfo(sender());
    QString specDir = ui->editDir->text();
    ui->plainTextEdit->appendPlainText("指定的目录=" + specDir);

    QTemporaryDir dir(specDir + "/TempDir_XXXXXX"); // _XXXXXX 代表自动生成随机字符串, 避免重名
    dir.setAutoRemove(false);
    ui->plainTextEdit->appendPlainText(dir.path() + "\n");
}

void Dialog::on_pushButton_60_clicked()
{
    // 3.在当前目录下创建临时文件夹
    showButtonInfo(sender());
    ui->plainTextEdit->appendPlainText("当前路径=" + QDir::currentPath());

    QTemporaryDir dir("SubDir_XXXXXX"); // 相对路径; _XXXXXX 代表自动生成随机字符串, 避免重名
    dir.setAutoRemove(false);
    ui->plainTextEdit->appendPlainText(dir.path() + "\n");
}

void Dialog::on_pushButton_61_clicked()
{
    // 1.在系统临时目录下创建临时文件
    showButtonInfo(sender());
    ui->plainTextEdit->appendPlainText("QDir::tempPath()=" + QDir::tempPath());

    QTemporaryFile file;
    file.setAutoRemove(false);
    file.open();
    ui->plainTextEdit->appendPlainText(file.fileName() + "\n");
    file.close();
}

void Dialog::on_pushButton_62_clicked()
{
    // 2.在指定目录下创建临时文件
    showButtonInfo(sender());
    QString specDir = ui->editDir->text();
    ui->plainTextEdit->appendPlainText("指定的目录=" + specDir);

    QTemporaryFile file(specDir + "/TempFile_XXXXXX.temp"); // _XXXXXX 代表自动生成随机字符串, 避免重名
    file.open();
    file.setAutoRemove(false);
    ui->plainTextEdit->appendPlainText(file.fileName() + "\n");
    file.close();
}


void Dialog::on_pushButton_63_clicked()
{
    // 3.在当前目录下创建临时文件
    showButtonInfo(sender());
    ui->plainTextEdit->appendPlainText("当前路径=" + QDir::currentPath());

    QTemporaryFile file("CurTempFile_XXXXXX.temp"); // 相对路径; _XXXXXX 代表自动生成随机字符串, 避免重名
    file.setAutoRemove(false);
    file.open();
    ui->plainTextEdit->appendPlainText(file.fileName() + "\n");
    file.close();
}

void Dialog::do_directoryChanged(const QString &path)
{
    ui->plainTextEdit->appendPlainText(path + "目录发生了变化\n");
}

void Dialog::do_fileChanged(const QString &path)
{
    ui->plainTextEdit->appendPlainText(path + "文件发生了变化\n");
}


void Dialog::on_pushButton_64_clicked()
{
    // addPath()并开始监视
    showButtonInfo(sender());
    fileWatcher->addPath(ui->editDir->text());
    fileWatcher->addPath(ui->editFile->text());

    connect(fileWatcher, &QFileSystemWatcher::directoryChanged, this, &Dialog::do_directoryChanged);
    connect(fileWatcher, &QFileSystemWatcher::directoryChanged, this, &Dialog::do_fileChanged);
}


void Dialog::on_pushButton_65_clicked()
{
    // removePath()并停止监视
    showButtonInfo(sender());
    fileWatcher->removePath(ui->editDir->text());
    fileWatcher->removePath(ui->editFile->text());

    disconnect(fileWatcher);
}


void Dialog::on_pushButton_66_clicked()
{
    // directories
    showButtonInfo(sender());
    for (auto &item : fileWatcher->directories()) {
        ui->plainTextEdit->appendPlainText(item);
    }
    ui->plainTextEdit->appendPlainText("");
}


void Dialog::on_pushButton_67_clicked()
{
    // files
    showButtonInfo(sender());
    for (auto &item : fileWatcher->files()) {
        ui->plainTextEdit->appendPlainText(item);
    }
    ui->plainTextEdit->appendPlainText("");
}

